home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJDEV200.ZIP / include / pc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-06  |  2.2 KB  |  68 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #ifndef __dj_include_pc_h_
  3. #define __dj_include_pc_h_
  4.  
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8.  
  9. #ifndef __dj_ENFORCE_ANSI_FREESTANDING
  10.  
  11. #ifndef __STRICT_ANSI__
  12.  
  13. #ifndef _POSIX_SOURCE
  14.  
  15. unsigned char    inportb  (unsigned short _port);
  16. unsigned short    inportw  (unsigned short _port);
  17. unsigned long    inportl  (unsigned short _port);
  18. void        inportsb (unsigned short _port, unsigned char  *_buf, unsigned _len);
  19. void        inportsw (unsigned short _port, unsigned short *_buf, unsigned _len);
  20. void        inportsl (unsigned short _port, unsigned long  *_buf, unsigned _len);
  21. void        outportb (unsigned short _port, unsigned char  _data);
  22. void        outportw (unsigned short _port, unsigned short _data);
  23. void        outportl (unsigned short _port, unsigned long  _data);
  24. void        outportsb(unsigned short _port, unsigned char  *_buf, unsigned _len);
  25. void        outportsw(unsigned short _port, unsigned short *_buf, unsigned _len);
  26. void        outportsl(unsigned short _port, unsigned long  *_buf, unsigned _len);
  27.  
  28. int        kbhit(void);
  29. int        getkey(void);    /* ALT's have 0x100 set */
  30. int        getxkey(void);    /* ALT's have 0x100 set, 0xe0 sets 0x200 */
  31.  
  32. void        sound(int _frequency);
  33. #define        nosound() sound(0)
  34.  
  35. extern unsigned char ScreenAttrib;
  36.  
  37. #define ScreenPrimary _go32_info_block.linear_address_of_primary_screen
  38. #define ScreenSecondary _go32_info_block.linear_address_of_secondary_screen
  39.  
  40. int    ScreenMode(void);
  41. int    ScreenRows(void);
  42. int    ScreenCols(void);
  43. void    ScreenPutChar(int _ch, int _attr, int _x, int _y);
  44. void    ScreenPutString(const char *_ch, int _attr, int _x, int _y);
  45. void    ScreenSetCursor(int  _row, int  _col);
  46. void    ScreenGetCursor(int *_row, int *_col);
  47. void    ScreenClear(void);
  48. void    ScreenUpdate(void *_virtual_screen);
  49. void    ScreenUpdateLine(void *_virtual_screen_line, int _row);
  50. void    ScreenRetrieve(void *_virtual_screen);
  51. void    ScreenVisualBell(void);
  52.  
  53. #endif /* !_POSIX_SOURCE */
  54. #endif /* !__STRICT_ANSI__ */
  55. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  56.  
  57. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  58.  
  59. #include <inlines/pc.h>
  60.  
  61. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  62.  
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66.  
  67. #endif /* !__dj_include_pc_h_ */
  68.